﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="MyDetailsControl.ascx.vb"
    Inherits="Controls_MyDetailsControl1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<style type="text/css">
    .hiddden
    {
        visibility: hidden;
    }
</style>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
    InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
    TypeName="LogginsLogDSTableAdapters.PersonTableAdapter" UpdateMethod="Update">
    <DeleteParameters>
        <asp:Parameter Name="Original_Id" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter DbType="Guid" Name="UserId" />
        <asp:Parameter Name="FirstName" Type="String" />
        <asp:Parameter Name="LastName" Type="String" />
        <asp:Parameter Name="MiddleInitial" Type="String" />
        <asp:Parameter Name="DisplayName" Type="String" />
        <asp:Parameter Name="ContactEmail" Type="String" />
        <asp:Parameter Name="ReportEmail" Type="String" />
        <asp:Parameter Name="ContactPhone" Type="String" />
        <asp:Parameter Name="ContactMobile" Type="String" />
        <asp:Parameter Name="Active" Type="Boolean" />
        <asp:Parameter Name="ReadTerms" Type="Boolean" />
        <asp:Parameter Name="AddToMailList" Type="Boolean" />
        <asp:Parameter Direction="InputOutput" Name="PersonId" Type="Object" />
    </InsertParameters>
    <SelectParameters>
        <asp:Parameter DbType="Guid" Name="UserId" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter DbType="Guid" Name="UserId" />
        <asp:Parameter Name="FirstName" Type="String" />
        <asp:Parameter Name="LastName" Type="String" />
        <asp:Parameter Name="MiddleInitial" Type="String" />
        <asp:Parameter Name="DisplayName" Type="String" />
        <asp:Parameter Name="ContactEmail" Type="String" />
        <asp:Parameter Name="ReportEmail" Type="String" />
        <asp:Parameter Name="ContactPhone" Type="String" />
        <asp:Parameter Name="ContactMobile" Type="String" />
        <asp:Parameter Name="Active" Type="Boolean" />
        <asp:Parameter Name="ReadTerms" Type="Boolean" />
        <asp:Parameter Name="AddToMailList" Type="Boolean" />
        <asp:Parameter Name="Original_Id" Type="Int32" />
    </UpdateParameters>
</asp:ObjectDataSource>
<asp:FormView ID="FormView2" runat="server" DataKeyNames="Id" DataSourceID="ObjectDataSource1"
    DefaultMode="Edit" Width="576px">
    <EditItemTemplate>
        <table>
            <tr>
                <td width="100" valign="middle">
                    First Name: *
                </td>
                <td>
                    <asp:TextBox ID="txtFirstName" runat="server" Text='<%# Bind("FirstName") %>' />
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="A First Name is Required"
                        ControlToValidate="txtFirstName"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Last Name: *
                </td>
                <td>
                    <asp:TextBox ID="txtLastName" runat="server" Text='<%# Bind("LastName") %>' />
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="A Last Name is Required"
                        ControlToValidate="txtLastName"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Initials:
                </td>
                <td>
                    <asp:TextBox ID="txtMiddleInitial" runat="server" Text='<%# Bind("MiddleInitial") %>' />
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    Display Name:
                </td>
                <td>
                    <asp:TextBox ID="txtDisplayName" runat="server" Text='<%# Bind("DisplayName") %>' />
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="A Display Name is Required"
                        ControlToValidate="txtDisplayName"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Contact Email: *
                </td>
                <td>
                    <asp:TextBox ID="txtContactEmail" runat="server" Text='<%# Bind("ContactEmail") %>'
                        Width="172px" />
                </td>
                <td>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ErrorMessage="A Contact Email Address is Required"
                        ControlToValidate="txtContactEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Report Email: *
                </td>
                <td>
                    <asp:TextBox ID="txtReportEmail" runat="server" Text='<%# Bind("ReportEmail") %>'
                        Width="172px" />
                </td>
                <td>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ErrorMessage="A Report Email Address is Required"
                        ControlToValidate="txtReportEmail" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Contact Phone: *
                </td>
                <td>
                    <asp:TextBox ID="txtContactPhone" runat="server" Text='<%# Bind("ContactPhone") %>'
                        ControlToValidate="txtContactPhone" />
                    <asp:MaskedEditExtender ID="txtContactPhone_MaskedEditExtender" runat="server" Mask="+999999999999"
                        OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" AcceptNegative="None"
                        CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat=""
                        CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder=""
                        CultureTimePlaceholder="" DisplayMoney="None" Enabled="True" InputDirection="LeftToRight"
                        TargetControlID="txtContactPhone" UserDateFormat="None" UserTimeFormat="None">
                    </asp:MaskedEditExtender>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="A Contact Phone is Required"
                        ControlToValidate="txtContactPhone"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Contact Mobile: *
                </td>
                <td>
                    <asp:TextBox ID="txtContactMobile" runat="server" Text='<%# Bind("ContactMobile") %>'
                        Width="170px" />
                    <asp:MaskedEditExtender ID="MaskedEditExtender1" runat="server" Mask="+999999999999"
                        OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" AcceptNegative="None"
                        CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat=""
                        CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder=""
                        CultureTimePlaceholder="" DisplayMoney="None" Enabled="True" InputDirection="LeftToRight"
                        TargetControlID="txtContactMobile" UserDateFormat="None" UserTimeFormat="None">
                    </asp:MaskedEditExtender>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
           <%-- <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>--%>
            <tr>
                <td>
                    Add To MailList:
                </td>
                <td>
                    <asp:CheckBox ID="AddToMailListCheckBox" runat="server" Checked='<%# Bind("AddToMailList") %>' />
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;<asp:Button ID="Button1" runat="server" CausesValidation="True" CommandName="Update"
                        Text="Submit" />
                        <asp:Button ID="Button2" runat="server" CausesValidation="False" CommandName="Home"
                        Text="Cancel" />
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <asp:CheckBox ID="ReadTermsCheckBox" runat="server" Checked='<%# Bind("ReadTerms") %>'
            CssClass="hiddden" />
        <asp:CheckBox ID="ActiveCheckBox" runat="server" Checked='<%# Bind("Active") %>'
            CssClass="hiddden" />
        <asp:TextBox ID="txtUserId" runat="server" Text='<%# Bind("UserId") %>' CssClass="hiddden" />
        <asp:Label ID="lblId" runat="server" Text='<%# Eval("Id") %>' CssClass="hiddden" />
        <br />
        <%--<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        --%>
    </EditItemTemplate>
    <EmptyDataTemplate>
        You have not fully completed your registration.
    </EmptyDataTemplate>
    <InsertItemTemplate>
        UserId:
        <asp:TextBox ID="UserIdTextBox" runat="server" Text='<%# Bind("UserId") %>' />
        <br />
        First Name:
        <asp:TextBox ID="FirstNameTextBox" runat="server" Text='<%# Bind("FirstName") %>' />
        <br />
        Last Name:
        <asp:TextBox ID="LastNameTextBox" runat="server" Text='<%# Bind("LastName") %>' />
        <br />
        Middle Initial:
        <asp:TextBox ID="MiddleInitialTextBox" runat="server" Text='<%# Bind("MiddleInitial") %>' />
        <br />
        Display Name:
        <asp:TextBox ID="DisplayNameTextBox" runat="server" Text='<%# Bind("DisplayName") %>' />
        <br />
        Contact Email:
        <asp:TextBox ID="ContactEmailTextBox" runat="server" Text='<%# Bind("ContactEmail") %>' />
        <br />
        Report Email:
        <asp:TextBox ID="ReportEmailTextBox" runat="server" Text='<%# Bind("ReportEmail") %>' />
        <br />
        Contact Phone:
        <asp:TextBox ID="ContactPhoneTextBox" runat="server" Text='<%# Bind("ContactPhone") %>' />
        <br />
        Contact Mobile:
        <asp:TextBox ID="ContactMobileTextBox" runat="server" Text='<%# Bind("ContactMobile") %>' />
        <br />
        Active:
        <asp:CheckBox ID="ActiveCheckBox0" runat="server" Checked='<%# Bind("Active") %>' />
        <br />
        Read Terms:
        <asp:CheckBox ID="ReadTermsCheckBox0" runat="server" Checked='<%# Bind("ReadTerms") %>' />
        <br />
        AddTo MailList:
        <asp:CheckBox ID="AddToMailListCheckBox0" runat="server" Checked='<%# Bind("AddToMailList") %>' />
        <br />
        <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
            Text="Insert" />
        &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
            CommandName="Cancel" Text="Cancel" />
    </InsertItemTemplate>
    <ItemTemplate>
        Id:
        <asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
        <br />
        UserId:
        <asp:Label ID="UserIdLabel" runat="server" Text='<%# Bind("UserId") %>' />
        <br />
        First Name:
        <asp:Label ID="FirstNameLabel" runat="server" Text='<%# Bind("FirstName") %>' />
        <br />
        Last Name:
        <asp:Label ID="LastNameLabel" runat="server" Text='<%# Bind("LastName") %>' />
        <br />
        Middle Initial:
        <asp:Label ID="MiddleInitialLabel" runat="server" Text='<%# Bind("MiddleInitial") %>' />
        <br />
        Display Name:
        <asp:Label ID="DisplayNameLabel" runat="server" Text='<%# Bind("DisplayName") %>' />
        <br />
        Contact Email:
        <asp:Label ID="ContactEmailLabel" runat="server" Text='<%# Bind("ContactEmail") %>' />
        <br />
        Report Email:
        <asp:Label ID="ReportEmailLabel" runat="server" Text='<%# Bind("ReportEmail") %>' />
        <br />
        Contact Phone:
        <asp:Label ID="ContactPhoneLabel" runat="server" Text='<%# Bind("ContactPhone") %>' />
        <br />
        Contact Mobile:
        <asp:Label ID="ContactMobileLabel" runat="server" Text='<%# Bind("ContactMobile") %>' />
        <br />
        Active:
        <asp:CheckBox ID="ActiveCheckBox1" runat="server" Checked='<%# Bind("Active") %>'
            Enabled="false" />
        <br />
        Read Terms:
        <asp:CheckBox ID="ReadTermsCheckBox1" runat="server" Checked='<%# Bind("ReadTerms") %>'
            Enabled="false" />
        <br />
        Add To MailList:
        <asp:CheckBox ID="AddToMailListCheckBox1" runat="server" Checked='<%# Bind("AddToMailList") %>'
            Enabled="false" />
        <br />
        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
            Text="Edit" />
        &nbsp;<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
            Text="Delete" />
        &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
            Text="New" />
    </ItemTemplate>
</asp:FormView>
